package com.fwmagic.dp._6._6_3;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class DynamicProxy<T> {
    public static <T> T newProxyInstance(ClassLoader classLoader, Class<?>[] interfaces, InvocationHandler handler){
        if(true){
            new BeforeAdvice().exec();
        }
        //执行目标，并返回结果
        return (T) Proxy.newProxyInstance(classLoader,interfaces,handler);
    }
}
